package com.iscreen.entities;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class SecurityTypesPK implements Serializable {
	@Column(name="MAIN_TYPE")
	private String mainType;

	@Column(name="SUB_TYPE")
	private String subType;

	private static final long serialVersionUID = 1L;

	public SecurityTypesPK() {
		super();
	}

	public String getMainType() {
		return this.mainType;
	}

	public void setMainType(String mainType) {
		this.mainType = mainType;
	}

	public String getSubType() {
		return this.subType;
	}

	public void setSubType(String subType) {
		this.subType = subType;
	}

	@Override
	public boolean equals(Object o) {
		if (o == this) {
			return true;
		}
		if ( ! (o instanceof SecurityTypesPK)) {
			return false;
		}
		SecurityTypesPK other = (SecurityTypesPK) o;
		return this.mainType.equals(other.mainType)
			&& this.subType.equals(other.subType);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.mainType.hashCode();
		hash = hash * prime + this.subType.hashCode();
		return hash;
	}

}
